/* File Name : IEventHandler.java */

package com.chenwenxuan.sync.event;

/**
 * Represents the implementation requirements for any class that wishes to be notified of events.
 * 
 * @author Jose Heitor
 * @version 1.0
 */
public interface IEventHandler
{
  /**
   * This method is called on the object that whishes to be notified of an event(s), when
   * the event(s) is fired.
   * <p>
   * All events from all sources will notify the <i>listener</i> object through this method call.
   * <p>
   * The source and type of event of the notification can be determined by implementing logic that examines the
   * <code>source</code> and <code>event</code> parameters of this method.
   * 
   * @param source The reference to the object that generated the event.
   * @param event The name of the event that was fired.
   * @param params Reference to the object through which any parameter(s) associated with this event
   * can be accessed.
   */
  public void handleEvent(IEventSource source, String event, Object params);
}